package com.test.pack1.demo.base1_4;

/**
 * Created by dws on 2017/11/16.
 *
 * 计时器
 */
public class StopWatch {

    private final long start;

    public StopWatch() {
        start = System.currentTimeMillis();
    }
    public double elapsedTime(){
        long now = System.currentTimeMillis();
        return (now -start)/1000.0;
    }
}
